<?php
// +----------------------------------------------------------------------
// | 幕小铺
// +----------------------------------------------------------------------
// | 版权所有 2016~2020 幕小铺科技（大连）有限公司
// +----------------------------------------------------------------------
// | 2020/03/14
// +----------------------------------------------------------------------
namespace app\video\behavior\submit_video_info_before;

/**
 * 检测如果上传精华版视频，当前状态必须是上传完成
 * @package app\video\behavior\submit_video_info_before
 * @author jason wang
 */
class submitVideoPlayStatus{
    /**
     * 执行行为 run方法是Behavior唯一的接口
     * @access public
     * @return void
     */
    public function run($params){
    	$play_id 	= $params['play_id'];
    	$son_play_id 	= $params['son_play_id'];
		if($son_play_id != ''){
			$play_operation_status = model('VideoPlay') -> find($play_id) -> play_operation_status;//检测当前视频状态
			if($play_operation_status != 4){
				return array_out(-1001, '视频未上传完成，请稍后再传');
			}
		}
    }
}
